var util = require('../../utils/util.js');
var ajax = require('../../utils/ajax.js');
var Pagination = require('../../utils/pagination.js');
var app =getApp();
Page({
    data: {
    	canWithDrawMoney:'',
    	account:''
    },

    onLoad(options) {
        this._options = options;
        this.setData({
        	account:options.re_account,
        	canWithDrawMoney:options.canWithDrawMoney
        })
    },
    _tx:function(evt){
    	var url = "/openapi/Shop/doWithdraw";
    	var {
    		amount
    	} = evt.detail.value;
    	var paramsData ={
    		number:amount,
    		account:this.data.account,
            shopSid:app.getShopSid()
    	};
    	ajax.P(url,paramsData,function(data){
            util.alert('提现成功',function(){
               wx.navigateBack();
            })
    	})
    }
});